package com.tiancheng.onecode.mapper;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.tiancheng.onecode.entity.Bill;
import com.tiancheng.onecode.model.dto.CumulativeGainDTO;
import com.tiancheng.onecode.model.request.admin.QueryBillReq;
import com.tiancheng.onecode.model.request.admin.StatisticsMerchantOrderReq;
import com.tiancheng.onecode.model.response.admin.BillQueryRes;
import com.tiancheng.onecode.model.response.admin.StatisticsMerchantOrderPayRes;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 账单持久化接口
 *
 * @author kellen
 * @date 2024-12-17
 */
@Repository
public interface BillMapper extends MYBaseMapper<Bill> {
    IPage<BillQueryRes> queryPage(IPage<Bill> page, @Param("c") QueryBillReq params);

    /**
     * 累计收益
     * @param platformMerchantId
     * @return
     */
    CumulativeGainDTO cumulativeGain(@Param("platformMerchantId")Long platformMerchantId);

    /**
     * 按天统计
     * @param params
     * @return
     */
    List<StatisticsMerchantOrderPayRes> statisticsByDay(StatisticsMerchantOrderReq params);
}